/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package PhysicCollection;

import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import javax.swing.JFrame;
import javax.swing.JTabbedPane;

/**
 *
 * @author Mr.D
 */
public class MainFrame extends JFrame implements KeyListener, MouseListener, MouseMotionListener, WindowListener{
    TabPanel tabpanel;
    BulletPanel bulletpanel;
    AngryBirdsDemo angrybirds;
    public MainFrame(){               
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setResizable(false);
        setBounds(50, 50, 1200, 650);
        setAlwaysOnTop(true);        
        addKeyListener(this);
        addWindowListener(this);
        tabpanel = new TabPanel();        
        tabpanel.addTab();
        tabpanel.addKeyListener(this);
        setContentPane(tabpanel);
        tabpanel.beginThread();
    }

    public void keyTyped(KeyEvent e) {
       
    }

    public void keyPressed(KeyEvent e) {
        if(e.getKeyCode() == KeyEvent.VK_ESCAPE){
            System.gc();
            System.exit(0);
        }
        else{
            tabpanel.keyPressed(e);
        }
    }

    public void keyReleased(KeyEvent e) {
        tabpanel.keyReleased(e);
    }

    public void mouseClicked(MouseEvent e) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public void mousePressed(MouseEvent e) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public void mouseReleased(MouseEvent e) {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public void mouseEntered(MouseEvent e) {
        
    }

    public void mouseExited(MouseEvent e) {

    }

    public void mouseDragged(MouseEvent e) {

    }

    public void mouseMoved(MouseEvent e) {

    }

    public void windowOpened(WindowEvent e) {

    }

    public void windowClosing(WindowEvent e) {
       System.out.println("To do: Process destructor in here");
    }

    public void windowClosed(WindowEvent e) {
         
    }

    public void windowIconified(WindowEvent e) {

    }
    
    public void windowDeiconified(WindowEvent e) {

    }

    public void windowActivated(WindowEvent e) {

    }

    public void windowDeactivated(WindowEvent e) {

    }

}
